package cmd

import "net"

const (
	startPortSlow      = 1
	endPortSlow        = 65535
	portRangeSizeLimit = 1024
	portListSizeLimit  = 1024
)

var top100WebPorts = []int{
	80, 280, 443, 591, 593, 832, 981, 1311, 1527, 1965, 2181, 2480, 4444, 4445, 4567, 5000, 5004, 5044, 5104, 5480,
	5489, 5791, 5800, 5985, 5986, 6121, 6667, 7000, 7001, 7002, 7443, 7473, 7474, 7687, 7700, 7777, 7778, 7779, 7780,
	7781, 7782, 7783, 7787, 7788, 7790, 7791, 7792, 7793, 7794, 7795, 7799, 7800, 7801, 8000, 8005, 8008, 8009, 8042,
	8080, 8082, 8088, 8090, 8096, 8182, 8222, 8243, 8280, 8281, 8333, 8403, 8448, 8530, 8531, 8844, 8887, 8888, 8920,
	8983, 8989, 8990, 9000, 9080, 9090, 9200, 9300, 9443, 9600, 9700, 9981, 10443, 11371, 12043, 12046, 12443, 13100,
	13101, 13102, 16080, 18091, 18092, 8443,
}

var commonHttpsPorts = []int{
	443, 8243, 5986, 1311, 981, 832, 7000, 7002, 8333, 8403, 8448, 8531, 8920, 12043, 8443,
}

var top10WebPorts = []int{
	80, 443, 8000, 8008, 8080, 8081, 7443, 8443, 9443, 10443,
}

// Private ip ranges
var privateIPBlocks = []string{
	"10.0.0.0/8",     // RFC1918
	"127.0.0.0/8",    // IPv4 loopback
	"172.16.0.0/12",  // RFC1918
	"192.168.0.0/16", // RFC1918
	"::1/128",        // IPv6 loopback
	"fc00::/7",       // IPv6 unique local addr
}

var privateIPs []*net.IPNet
